class Solution:
    def flowerGame(self, n: int, m: int) -> int:
        a, b = (n + 1) // 2, n // 2
        c, d = (m + 1) // 2, m // 2
        return a * d + b * c
